home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / zbpc_460.zip / UTILITY.EXE / SCROLL.BAS < prev    next >
BASIC Source File  |  1991-03-27  |  2KB  |  52 lines

  1. ' These two functions can be used to scroll a window either up or down.
  2. ' X1%,Y1% are the coordinates of the upper left corner of the window.
  3. ' X2%,Y2% are the coordinates of the lower right corner of the window.
  4. ' Attrib% is the color attribute for the new blank line
  5. ' Experiment with them a little to get a feel for them.
  6. :
  7. LONG FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
  8. MACHLG &B8,1,6
  9. MACHLG &8A,&3E,Attrib%
  10. MACHLG &8A,&2E,Y1%
  11. MACHLG &8A,&0E,X1%
  12. MACHLG &8A,&36,Y2%
  13. MACHLG &8A,&16,X2%
  14. MACHLG &CD,&10
  15. END FN
  16. :
  17. LONG FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
  18. MACHLG &B8,1,7
  19. MACHLG &8A,&3E,Attrib%
  20. MACHLG &8A,&2E,Y1%
  21. MACHLG &8A,&0E,X1%
  22. MACHLG &8A,&36,Y2%
  23. MACHLG &8A,&16,X2%
  24. MACHLG &CD,&10
  25. END FN
  26. :
  27. COLOR ,31 : CLS : FOR X = 1 TO 25 : PRINT STRING$ (79, RND (100) + 32) : NEXT
  28. X1% = 10 : X2% = 40 : Y1% = 10 :Y2% = 15
  29. "Delay" IF INKEY$ = "" GOTO "Delay"
  30. FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
  31. "Delay0" IF INKEY$ = "" GOTO "Delay0"
  32. FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
  33. "Delay1" IF INKEY$ = "" GOTO "Delay1"
  34. FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
  35. "Delay2" IF INKEY$ = "" GOTO "Delay2"
  36. FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
  37. "Delay3" IF INKEY$ = "" GOTO "Delay3"
  38. FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
  39. "Delay4" IF INKEY$ = "" GOTO "Delay4"
  40. FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
  41. "Delay5" IF INKEY$ = "" GOTO "Delay5"
  42. FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
  43. "Delay6" IF INKEY$ = "" GOTO "Delay6"
  44. FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
  45. "Delay7" IF INKEY$ = "" GOTO "Delay7"
  46. FN Scrolldown(X1%,Y1%,X2%,Y2%,Attrib%)
  47. "Delay8" IF INKEY$ = "" GOTO "Delay8"
  48. FN Scrollup(X1%,Y1%,X2%,Y2%,Attrib%)
  49. "Delay9" IF INKEY$ = "" GOTO "Delay9"
  50. INPUT D
  51.  
  52.